var express = require('express');
var app = express();
 
app.use(express.static('public'));//express.static是express提供的内置的中间件用来设置静态文件路径
 
app.get('/index.htm', function (req, res) {
    res.sendFile(__dirname + "/" + "index.htm");
})
 
var server = app.listen(3000, function () {
    console.log("监听3000端口")
})